require "bundler/gem_tasks"

task :default => :spec
namespace :vagrant do
  desc "vagrant uninstall"
  task :uninstall do
    `vagrant plugin uninstall vagrant-disksize`
  end

  desc "vagrant install"
  task install: ["vagrant:uninstall", :clean, :build] do
    require_relative "lib/vagrant/disksize/version"
    sh_script = %(
    vagrant plugin install\
        ./pkg/vagrant-disksize-#{Vagrant::Disksize::VERSION}.gem\
        --plugin-clean-sources
    )
    sh sh_script
  end
end
